<!DOCTYPE html>
<html>

	<head>
		<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/> 
		<title>E总管-个人中心</title>
		<link rel="stylesheet" href="src/css/bootstrap.min.css" />
		<link rel="stylesheet" href="src/css/bootstrapValidator.min.css" />
		<link rel="stylesheet" href="src/swiper/swiper-3.4.2.min.css" />
		<link rel="stylesheet" href="public/css/my_style.css" />
		<link rel="stylesheet" href="public/css/header.css" />
		<link rel="stylesheet" href="public/css/footer.css" />
		<link rel="stylesheet" href="css/my_center.css" /> 
	</head>

	<body>
		<div id="app" v-cloak>
			<!--头部-->
			<m_header :user_info="infos"></m_header>
			<!--主体-->
			<div class="main my_container">
				<div class="my_info">
					<div class="my_flex my_flex_col">
						<div class="cursor radius overflow" @click='type=4'>
							<img :src="(infos.user.isLogin && infos.user.HeadImg) ? (host+infos.user.HeadImg) : 'imgs/icon.jpg'" onerror="globalData.utils.imgLoadErr(event)" alt="" />
						</div>						
						<span class="cursor">{{infos.user.UserName}}</span>
						<li class="cursor unactive" @click='type=5' v-bind:class='[{active:infos.user.IsVip==1}]'>
							<span v-if="infos.user.IsVip==0">未签约</span>
							<span v-if="infos.user.IsVip==1">已签约</span>
							<span v-if="infos.user.IsVip==2">审批拒绝</span>
							<span v-if="infos.user.IsVip==3">待审核</span>
						</li>						
					</div>
					<div style="overflow: hidden;">
						<li class="my_flex my_flex_center cursor" v-bind:class='{active:type==0}' @click='type=0'>金币管理</li>
						<li class="my_flex my_flex_center cursor" v-bind:class='{active:type==1}' @click='type=1'>我的收藏</li>
						<li class="my_flex my_flex_center cursor" v-bind:class='{active:type==2}' @click='type=2'>修改密码</li>
						<li class="my_flex my_flex_center cursor" v-bind:class='{active:type==3}' @click='type=3'>站内信</li>
						<li class="my_flex my_flex_center cursor" v-bind:class='{active:type==6}' @click='type=6'>成单记录</li>
						<li class="my_flex my_flex_center cursor" v-bind:class='{active:type==7}' @click='type=7'>客户管理</li>
					</div>
				</div>
				<!--右侧信息-->
				<div class="right">
					<!--我的金币-->
					<div class="coin one_type" v-if='type==0'>
						<li class="type_title">金币管理</li>
						<coin></coin>
					</div>
					
					<!--修改密码-->
					<edit_password v-if='type==2'></edit_password>
					<!--我的收藏-->
					<div class="collection one_type" v-if='type==1'>
						<li class="type_title">我的收藏</li>
						<div class="overflow my_tabs">
							<li class="type text-center cursor" v-bind:class="[{active:collection_type==0}]" @click="collection_type=0">论坛</li>	
							<li class="type text-center cursor" v-bind:class="[{active:collection_type==1}]" @click="collection_type=1">新闻</li>
							
						</div>
						<!--内容-->
						<div class="content">
							<div class="posts">
								<col_post :collection_type="collection_type"></col_post>
							</div>
						</div>
					</div>
					<!--站内信-->
					<div class="letters one_type" v-if='type==3'>
						<li class="type_title">站内信</li>
						<div class="overflow my_tabs">
							<li class="type text-center cursor" v-bind:class="[{active:letter_type==0}]" @click="letter_type=0">系统通知</li>
							<li class="type text-center cursor" v-bind:class="[{active:letter_type==1}]" @click="letter_type=1">对账单</li>
							<li class="type text-center cursor" v-bind:class="[{active:letter_type==2}]" @click="letter_type=2">客服回信</li>
							<li class="type text-center cursor" v-bind:class="[{active:letter_type==3}]" @click="letter_type=3">佣金记录</li>
							<li class="type text-center cursor" v-bind:class="[{active:letter_type==4}]" @click="letter_type=4">案例跟踪</li>
						</div>
						<!--内容-->
						<div class="content">
							<!--系统通知-->
							<sys_notice v-if='letter_type==0'></sys_notice>
							<!--对账单-->
							<account_statements v-if="letter_type==1"></account_statements>
							<!--客服回信-->
							<customer_reply v-if='letter_type==2'></customer_reply>
							<!--佣金记录-->
							<commisson_records v-if='letter_type==3'></commisson_records>
							<!--案例追踪-->
							<product_trade_trackings v-if='letter_type==4'></product_trade_trackings>
						</div>
					</div>
					<!--修改头像-->
					<div class="my_icon one_type" v-if='type==4'>
						<li class="type_title">上传头像</li>
						<!--内容-->
						<div class="content">
							<div class="icon">
								<img id="upimage" class="transform_center" :src="(infos.user.isLogin && infos.user.HeadImg) ? (host+infos.user.HeadImg) : 'imgs/icon.jpg'" onerror="globalData.utils.imgLoadErr(event)" onload="globalData.utils.img_onload(event)" alt="..." class="img-rounded">
								<input type="file" @change="addImg($event)" class="add_img  upload_input" />
							</div>
							<div class="text-center">
								<button type="button"  @click="upload_icon" class="btn btn-base confirm">上 传</button>
							</div>
						</div>
					</div>
					<!--成为签约用户-->
					<signed v-if='type==5' :user_info="infos"></signed>
					<!--成单记录-->
					<single_record v-if="type==6" :parent_data="children_data"></single_record>
					<!--客户列表-->
					<customer_list v-if="type==7" :parent_data="children_data"></customer_list>
				</div>
			</div>	
			<!--footer-->
			<m_bottom></m_bottom>
			
			<!--修改邮箱、用户、-->
			<div class="modal my_modal fade" id="change_email" tabindex="-1" role="dialog">
				<div class="modal-dialog" role="document">
				    <div class="modal-content">
				      <div class="modal-body">
						<form class="form-horizontal form" id="register" role="form">
							<div class="form-group">
								<label for="inputEmail1" class="col-sm-2 control-label">新用户名:</label>
								<div class="col-sm-9">
									<input type="text" v-model='new_username' name="" class="form-control" placeholder="新用户名">									
								</div>
							</div>	
							<div class="form-group">
								<label for="inputEmail1" class="col-sm-2 control-label">邮箱:</label>
								<div class="col-sm-9">
									<input type="email" v-model='new_username' name="" class="form-control" placeholder="新用户名">									
								</div>
							</div>	
						</form>
				      </div>
				      <div class="modal-footer">
				      	<button type="button" class="btn cancel" data-dismiss="modal">取消</button>
				        <button type="button" class="btn btn-base confirm" data-dismiss="modal">确 定</button>
				      </div>
				    </div>
			  	</div>
			</div>
			<!--loading-->
			<loading></loading>
			<div class="mask"></div>
			<recommed v-if="children_data.isShow" :parent_data="children_data"></recommed>		
			
		</div>
		<script src="src/jquery.js"></script>
		<script src="src/vue.min.js"></script>
		<script src="public/js/comm.js"></script>
		<script src="src/js/bootstrap.min.js"></script>
		<script src="src/js/bootstrapValidator.min.js"></script>
		
		<script src="public/js/header_bottom.js"></script>
		<script src="public/component/my_center/edit_passwd.js"></script>
		<script src="public/component/my_center/sys_notice.js"></script>
		<script src="public/component/my_center/customer_reply.js"></script>
		<script src="public/component/my_center/commisson_records.js"></script>
		<script src="public/component/my_center/account_statements.js"></script>
		<script src="public/component/my_center/product_trade_trackings.js"></script>
		<script src="public/component/my_center/coin.js"></script>
		<!--帖子-->
		<script src="public/component/change_page.js"></script>
		<script src="public/component/verification_code.js"></script>
		<script src="public/component/my_center/col_post.js"></script>
		<script type="text/x-template" id="signed">
			<div class="signed one_type" >
				<li class="type_title">成为签约用户</li>
				<!--内容-->
				<div class="content">
					<div v-if="user_info.signed_step==0">
						<div class="sign_type">
							<figure class="cursor" @click="go_step2(1)">
							  <img src="imgs/my_center/info/person.png" alt="img21"/>
							  <figcaption>								    
							      <p>个人用户</p>
							  </figcaption>            
							</figure>
						</div>
						<div class="sign_type">
							<figure class="cursor" @click="go_step2(2)">
							  <img src="imgs/my_center/info/company.png" alt="img21"/>
							  <figcaption>								    
							      <p style="position: relative;left: 2px;">机构用户</p>
							  </figcaption>            
							</figure>
						</div>
					</div>
					<div class="person photos" v-if="user_info.signed_step==1">
						<li class="title text-center">上传身份证</li>
						<div class="overflow">
							<div class="col-sm-6">
								<div class="id_card">
									<template v-if="user_info.user.IsVip==0||user_info.user.IsVip==2">
										<img  src="imgs/my_center/signed/add.png" alt="" />
										<input type="file" @change="addImg($event,'IDCard_Front')" class="add_img  upload_input" />
									</template>									
									<img v-else :src="host+userinfo.IDCard_Front" alt="..." class="img-rounded">									
								</div>								
								<p class="text-center">正面</p>
							</div>
							<div class="col-sm-6">
								<div class="id_card">
									<template v-if="user_info.user.IsVip==0||user_info.user.IsVip==2">
										<img  src="imgs/my_center/signed/add.png" alt="" />
										<input type="file" @change="addImg($event,'IDCard_Back')" class="add_img  upload_input" />
									</template>									
									<img v-else  :src="host+userinfo.IDCard_Back"  alt="..." class="img-rounded">									
								</div>
								<p class="text-center">反面</p>
							</div>
						</div>
						<li class="title text-center">上传手持身份证</li>
						<div class="overflow">
							<div class="col-sm-6">
								<div class="id_card">
									<template v-if="user_info.user.IsVip==0||user_info.user.IsVip==2">
										<img src="imgs/my_center/signed/add.png" alt="" />
										<input  type="file" @change="addImg($event,'IDCard_Body')" class="add_img  upload_input" />
									</template>									
									<img  v-else :src="host+userinfo.IDCard_Body" alt="..." class="img-rounded">									
								</div>
								<p class="text-center">手持身份证照</p>
							</div>
							<div class="col-sm-6">
								<div class="id_card">
									<img   src="imgs/my_center/signed/1.png"  alt="..." class="img-rounded">
								</div>
								<p class="text-center">示例</p>
							</div>
						</div>
						<form class="form-horizontal signed_form"  style="padding: 20px 0;">
							
						  <div class="form-group">
						    <label for="inputEmail3" class="col-sm-4 control-label">请输入身份证号码：</label>
						    <div class="col-sm-6">
						      <input type="input" class="form-control"  v-bind:disabled="user_info.user.IsVip==1||user_info.user.IsVip==3" v-model="userinfo.IDCard" name="IDCard" placeholder="">
						    </div>
						  </div>	
						  <div v-if="type==2">
						  	<li class="title text-center">上传营业执照</li>
							<div class="overflow">
								<div class="col-sm-6 col-sm-offset-3">
									<div class="id_card">
										<template v-if="user_info.user.IsVip==0||user_info.user.IsVip==2">
											<img  src="imgs/my_center/signed/add.png" alt="" />
											<input type="file"  @change="addImg($event,'BusinessLicense')" class="add_img  upload_input" />
										</template>
										<template v-else>
											<img  v-if="userinfo.BusinessLicense" :src="host+userinfo.BusinessLicense" alt="..." class="img-rounded">
											<img v-else src="imgs/my_center/signed/add.png" alt="" />
										</template>
										
										
									</div>
									<p class="text-center">照片</p>
								</div>										
							</div>
							<div class="form-group">
							    <label for="inputEmail3" class="col-sm-4 control-label">机构全称：</label>
							    <div class="col-sm-6">
							      <input type="input" class="form-control" v-bind:disabled="user_info.user.IsVip==1||user_info.user.IsVip==3" v-model="userinfo.CompanyName" name="CompanyName" id="" placeholder="">
							    </div>
							  </div>	
							  <div class="form-group">
							    <label for="inputEmail3" class="col-sm-4 control-label">营业地址：</label>
							    <div class="col-sm-6">
							      <input type="input" class="form-control" v-bind:disabled="user_info.user.IsVip==1||user_info.user.IsVip==3" v-model="userinfo.CompanyAddress" name="CompanyAddress" placeholder="">
							    </div>
							  </div>	
							  <div class="form-group">
							    <label for="inputEmail3" class="col-sm-4 control-label">机构窗口联系人：</label>
							    <div class="col-sm-6">
							      <input type="input" class="form-control" v-bind:disabled="user_info.user.IsVip==1||user_info.user.IsVip==3" v-model="userinfo.CompanyContactor" name="CompanyContactor"  placeholder="">
							    </div>
							  </div>	
							  <div class="form-group">
							    <label for="inputEmail3" class="col-sm-4 control-label">联系方式：</label>
							    <div class="col-sm-6">
							      <input type="input" class="form-control" v-bind:disabled="user_info.user.IsVip==1||user_info.user.IsVip==3" v-model="userinfo.CompanyContactTel" name="CompanyContactTel" placeholder="">
							    </div>
							  </div>									  
						  </div>								  				
						  <div class="form-group">
						    <div class="text-center">
						    	<div class="col-sm-2 col-sm-offset-4">
							      <button v-if="user_info.user.IsVip==0||user_info.user.IsVip==2" @click="Submit" class="btn btn-base" type="button">提 交</button>
							    </div>
						    	</div>
						  </div>	
						</form>
					</div>
				</div>
			</div>
		</script>
		<script type="text/x-template" id="single_record">
			<div class="single_record one_type">
				<li class="type_title">成单记录</li>
				<div class="">
					<div class="one_news overflow cursor" v-for="(item,index) in users">
						<div class="overflow" @click="getUserCustomeProducts(item)">
							<li class="money">{{item.CustomerName}}</li>
							<li>{{item.Sex?"男":"女"}}</li>
							<li>{{item.Age}}岁</li>
							<li>{{item.Address}}</li>
							<li>{{item.Career}}</li>
						</div>
						<div>
							<li @click="getProductForCustomer(item)">成单产品：<span><i class="glyphicon glyphicon-chevron-right"></i></span></li>
						</div>					
					</div>
					<table class="table  table-striped" v-if="users.length==0">						
						<tr class="text-center no_user" ><td>暂无成单记录</td></tr>
					</table>
					<!--成单产品-->
					<div class="recommend complete_product">
						<button type="button" style="width: auto;" @click="hide" class="btn btn-base back_list_btn" >返回列表</button>
						<div class="lists">
							<li class="title text-center">成单产品</li>
							<div class="list" >
								<div class="one_list cursor" @click="go_introduce(item,$event)" v-for="item in complete_list">
									<div>
										{{item.ProductName}}
									</div>
									<div>
										成交时间:{{item.TradeDateText}}
									</div>
									<div>
										<span>
											购买金额：{{item.PolicyAmount}}{{item.PolicyAmountCurrencyType}}
										</span>
										<span>
											佣金：{{item.Commission}}{{item.CommissionCurrencyType}}
										</span>
									</div>
									<i class="glyphicon glyphicon-chevron-right"></i>
								</div>								
								<div v-if="complete_list.length==0" class="text-center" style="font-size: 20px;padding-top: 30px;">暂无数据</div>
							</div>
						</div>
					</div>
				</div>
			</div>
		</script>
		<!--客户列表-->
		<script type="text/x-template" id="customer_list">
			<div class="single_record customer_list one_type">
				<li class="type_title">客户列表</li>
				<div class="">
					<div class="one_news overflow cursor" v-for="(item,index) in users">
						<div class="overflow" @click="getUserCustomeProducts(item)">
							<li class="money">{{item.CustomerName}}</li>
							<li>{{item.Sex?"男":"女"}}</li>
							<li>{{item.Age}}岁</li>
							<li>{{item.Address}}</li>
							<li>{{item.Career}}</li>
						</div>
						<div>
							<li @click="getProductForCustomer(item)">成单产品：<span><i class="glyphicon glyphicon-chevron-right"></i></span></li>
						</div>					
					</div>
					<table class="table  table-striped" v-if="users.length==0">						
						<tr class="text-center no_user" ><td>暂无客户记录</td></tr>
					</table>
				</div>
				<!--成单产品-->
				<div class="recommend complete_product">
						<button type="button" style="width: auto;" @click="hide" class="btn btn-base back_list_btn" >返回列表</button>
						<div class="lists">
							<li class="title text-center">成单产品</li>
							<div class="list" >
								<div class="one_list cursor" @click="go_introduce(item)" v-for="item in complete_list">
									<div>
										{{item.ProductName}}
									</div>
									<div>
										成交时间:{{item.TradeDateText}}
									</div>
									<div>
										<span>
											购买金额：{{item.PolicyAmount}}{{item.PolicyAmountCurrencyType}}
										</span>
										<span>
											佣金：{{item.Commission}}{{item.CommissionCurrencyType}}
										</span>
									</div>
									<i class="glyphicon glyphicon-chevron-right"></i>
								</div>
								<div v-if="complete_list.length==0" class="text-center" style="font-size: 20px;padding-top: 30px;">暂无数据</div>
							</div>
						</div>
					</div>
			</div>
		</script>
		<!--配置推荐-->
		<script type="text/x-template" id="recommed">		
			<!--推荐配置-->
			<div class="recommend ss">
				<button type="button" style="width: auto;" class="btn btn-base back_list_btn" @click="back">返回列表</button>
				<div class="lists">
					<li class="title text-center" style="letter-spacing: 2px;">配置推荐</li>
					<div class="list" v-for="(value, key, index) in recommed_list">
						<template v-if="key=='海外保单'">
							<template v-for="item_m in value">
								<li class="name text-center">{{item_m.CategoryName}}</li>
								<ul>
									<li class="cursor" @click="go_introduce(item)" v-for="item in item_m.Products">{{item.ProductName}}<i style="float: right;" class="glyphicon glyphicon-chevron-right"></i></li>
								</ul>
							</template>							
						</template>
						<template v-else-if="key=='现有财富健康分析'">
							<li class="name text-center">{{key}}</li>
								<ul>
									<li class="cursor now_" @click="go_introduce(item)" v-for="item in value">
										<div>{{item.Key}}</div> <div>{{item.Value}}</div><div>建议：<span v-text="item.Suggestion ? item.Suggestion" : '无'></span></div>
									</li>
								</ul>
						</template>
						<template v-else-if="key=='离岸信托'">
							<li class="name text-center">{{key}}</li>
							<ul>
								<template v-for="item in value">
									<li class="cursor" v-if="!item.Products.IsNotFree" @click="go_introduce2(item.Products)">{{item.Products.ProductName}}<i style="float: right;" class="glyphicon glyphicon-chevron-right"></i></li>
								</template>							
							</ul>		
						</template>
						<template v-else>
							<li class="name text-center">{{key}}</li>
							<ul>
								<template v-for="item in value">
									<li class="cursor" @click="go_introduce(item_m)" v-for="item_m in item.Products">{{item_m.ProductName}}<i style="float: right;" class="glyphicon glyphicon-chevron-right"></i></li>
								</template>							
							</ul>						
						</template>
						
					</div>
				</div>
			</div>
		</script>
		<!--在线支付-->
		<script type="text/x-template" id="coin_template">		 
		 	<div>
				<div class="content" v-if="step==0">
					<div class="logo">
						<img src="imgs/my_center/coin/coin.png" alt="" />
					</div>
					<div>
						<li>我的金币</li>
						<li>{{Coins}}金币</li>
					</div>
					<div>
						<button type="button" class="btn btn-base confirm" data-dismiss="modal" @click="select_recharge">金币充值</button>
						<button type="button" class="btn btn-base confirm" data-dismiss="modal" @click="getPageWalletLogs">交易记录</button>
					</div>
				</div>
				<!--充值列表-->
				<div class="lists overflow" v-if="step==1">
					<div class="one_list" v-for="(item,index) in lists">
						<div class="my_flex my_flex_col_around cursor " v-bind:class="[{active:money_index==index}]" @click="select_coin(index,item)">
							<div>
								<li>{{item.Coins}}金币</li>
								<li>赠送{{item.GivenCoins}}金币</li>
							</div>
							<div>
								<li>售价{{item.Amount}}元</li>
							</div>
						</div>
					</div>
					<div class="clear"></div>
					<div class="recharge">
						<button type="button" @click="recharge" style="width: auto;" class="btn btn-base confirm">充值</button>
					</div>
				</div>
				<form name="alipaysubmit" action="https://www.alipay.com/cooperate/gateway.do?_input_charset=utf-8" method="post">
					<input type="hidden" name="_input_charset" id="_input_charset" value="utf-8">
					<input type="hidden" name="body" id="body" v-model="coins_with_unit">
					<input type="hidden" name="notify_url" id="notify_url" :value="host+'/Manage/PayNotice/Index'">
					<input type="hidden" name="out_trade_no" id="out_trade_no" v-model="out_trade_no">
					<input type="hidden" name="partner" id="partner" v-model="partner">
					<input type="hidden" name="payment_type" value="1">
					<input type="hidden" name="seller_id" id="seller_id" v-model="partner">
					<input type="hidden" name="service" id="service" value="create_direct_pay_by_user">
					<input type="hidden" name="subject" id="subject" value="WOW金币购买">
					<input type="hidden" name="total_fee" id="total_fee" v-model="money_item.Money">
					<input type="hidden" name="sign" id="sign" value="">
					<input type="hidden" name="return_url" id="return_url" value="">
					<input type="hidden" name="sign_type" id="sign_type" value="RSA">
				</form>
				<div class="copy text-center" v-if="step!=3">
					<div>
						遇到问题，<span class="cursor">联系客服</span>
					</div>
					<div>本服务由中软云科技提供交易安全支持</div>
				</div>
				<!--交易列表-->
				<div class="trade_log" v-if="step==3">
					<div class="text-center">交易记录
						<button class="btn btn-base" style="width: auto;" @click="step=0">返回</button>
					</div>
					<div class="one_list" v-for="item in logList" v-if="item.ActionName">
						<div class="title">{{item.ActionName}}</div>
						<div class="count my_flex">
							<span>{{item.StatusName}}</span>
							<span>{{item.MoneyText}}</span>
							<span>{{item.LogDate}}</span>
						</div>
					</div>
				</div>
			</div>
		</script>
		<script src="public/component/my_center/detail/recommed.js"></script>
		<script src="public/component/my_center/customer_list.js"></script>
		<script src="public/component/my_center/single_record.js"></script>
		<script src="public/component/my_center/signed.js"></script>
		<script src="js/my_center.js"></script>
	</body>

</html>